import QtQuick 2.0
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1

Button {
    id: root_Button
    property string nomPic
    property string hoverPic
    property string pressPic
    width: 50
    height: 50
    anchors.left: parent.left
    anchors.top: parent.top
    style: ButtonStyle {
        background:Rectangle{
            implicitHeight: root_Button.height
            implicitWidth:  root_Button.width
            color: "transparent"  //设置背景透明，否则会出现默认的白色背景
            BorderImage{
                anchors.fill: parent
                source: control.hovered ? (control.pressed ? root_Button.pressPic : root_Button.hoverPic) : root_Button.nomPic;
            }
        }
    }
}

